<div id="app-container" class="container" myapp="STORE_WECHAT_INFOS_EDIT">
  <%= hidden_field_tag :authenticity_token, form_authenticity_token, id: 'js-ruiqu-store-product-index' %>
  <div class="">
    <%= search_form_for @q, url: ruiqu_custom_products_path, class: 'form-inline' do |f|%>
      <div class="form-group">
        <input type="text" value="<%= @id %>" name="q[id_eq]" style="margin-left:15px;" class="form-control input"  placeholder="请输入商品ID查询">
      </div>
      <button type="submit" style="height:30px;width:40px;" class="ui-btn ui-btn-primary js-filter">查询</button>
    <% end %>

  </div>


  <div class="app">
     <div class="app-inner clearfix">
         <table id="wechat_table" class="ui-table ui-table-list">
          <thead>
              <tr>
                <th>
                  #
                </th>
                <th>
                  <%= "公司名称" %>
                </th>
                <th>
                  <%= "姓名" %>
                </th>
                <th>
                  <%= "名字" %>
                </th>
                <th>
                  <%= "规格" %>
                </th>
                <th>
                  <%= "价格" %>
                </th>
                <th>
                  <%= "操作" %>
                </th>
              </tr>
          </thead>
          <tbody>
              <% @store_products.each_with_index do |product, i| %>
                <tr>
                  <td>
                    <%= i + 1 %>
                  </td>
                  <td>
                    <%= product.store_customer.company_name %>
                  </td>
                  <td>
                    <%= product.store_customer.name %>
                  </td>
                  <td>
                    <%= link_to product.name, ruiqu_custom_product_path(product), class: "product-to-show" %>
                  </td>
                  <td>
                    <%= product.format %>
                  </td>
                  <td>
                    <%= product.price %>
                  </td>
                  <td>
                    <%= link_to '删除', unuse_ruiqu_custom_product_path(product), method: :put, data: {confirm: "确认删除吗?"}%>

                    <%= link_to '编辑', edit_ruiqu_custom_product_path(product) %>

                    <span>屏蔽显示</span>

                  </td>
                </tr>
              <% end %>
          </tbody>
        </table>
      </div>
  </div>

</div>
